package org.example.tlias.utils;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "tlias.jwt")
public class JwtProperties {
    private String secretKey;
    private long ttlMillis;
    private String empToken;


    public JwtProperties() {
    }

    public JwtProperties(String secretKey, long ttlMillis) {
        this.secretKey = secretKey;
        this.ttlMillis = ttlMillis;
    }

    public JwtProperties(String secretKey, long ttlMillis, String empToken) {
        this.secretKey = secretKey;
        this.ttlMillis = ttlMillis;
        this.empToken = empToken;
    }

    /**
     * 获取
     * @return secretKey
     */
    public String getSecretKey() {
        return secretKey;
    }

    /**
     * 设置
     * @param secretKey
     */
    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    /**
     * 获取
     * @return ttlMillis
     */
    public long getTtlMillis() {
        return ttlMillis;
    }

    /**
     * 设置
     * @param ttlMillis
     */
    public void setTtlMillis(long ttlMillis) {
        this.ttlMillis = ttlMillis;
    }

    public String toString() {
        return "JwtProperties{secretKey = " + secretKey + ", ttlMillis = " + ttlMillis + "}";
    }

    /**
     * 获取
     * @return empToken
     */
    public String getEmpToken() {
        return empToken;
    }

    /**
     * 设置
     * @param empToken
     */
    public void setEmpToken(String empToken) {
        this.empToken = empToken;
    }
}
